package com.xnyzc.lhy.common.penum.dept;

/**
 * @Description 机构类型
 * @Author zhuyubin
 * @Date 2019-08-17 19:53
 **/
public enum EOffIceType {

    company(1, "公司"),
    dept(2, "部门"),
    group(3, "小组"),
    other(4, "其他");

    private Integer value;
    private String desc;

    EOffIceType(Integer value, String desc){
        this.value = value;
        this.desc = desc;
    }

    public Integer getValue() {
        return this.value;
    }

    public String getDesc() {
        return this.desc;
    }

    public static EOffIceType findById(Integer type) {
        EOffIceType ePaymentType;
        switch (type) {
            case 1:
                ePaymentType = EOffIceType.company;
                break;
            case 2:
                ePaymentType = EOffIceType.dept;
                break;
            case 3:
                ePaymentType = EOffIceType.group;
                break;
            case 4:
                ePaymentType = EOffIceType.other;
                break;
            default:
                throw new IllegalArgumentException("未设置");
        }
        return ePaymentType;
    }


}
